trying to fix bug in location changed