Fixed incorrect call to getLocation()