location bug fix, units setting implemented