fixed sliding/blackhole bug caused by a previous edit to getLocation