fixing error in enemy behaviour