fixed crash when player logs off