added checks to prevent dirft of enemies