Fixed bugs regarding the change from integer to double coordinates