change location only when it is not the same as current