fixed bug that occured when player died