fixed issue with ajax messing up coordinate calcs.