Merge from unstable (fixes for user switching bugs)