Properly detect location at first try