Fixed freezing problem (was getting stuck in the function checking enemy spawn placement)