location bug fix