fixed return value of getLocation()