bug in location calc