commit before switching tasks