fix loc bug