Fix location update bug