Test and fix Player.is_user() bug
Improve stop script end detection