Merge from unstable (fix for switchToUser)