Fix: bug in setting the states of the samples/current location/location history