Improve handle of enter/exit of user in sync environment