commit before switching.