Fix user leave bug