make showLocation more robust