bug fix for location