fixed lag issue when enemies attacked