When I entered the room in which the ghost was. It started to come towards me, and stopped next to me, but walking animation was active and my flashlight was off. If I walked towards the ghost than the game over would pop up.