CHANGED:applied the locationHackFix function for simulation testing