Hard to say. You don't tell us much information, like what kind of results you get.
All I can say at this point is;
Have you tried using the Global flag with your EntityXYZ# commands?
Have you verified that x1,x2,y1,y2 all have valid values (I can't tell from your code)?
All I can say at this point is;
Have you tried using the Global flag with your EntityXYZ# commands?
Have you verified that x1,x2,y1,y2 all have valid values (I can't tell from your code)?