Merge fix for logging of mode changes by charly.