Fix a small bug of switching user.