Fix some functions based on location.