Fix location handling.