Removed a debug print.
Bugfix: do not let the location command fail if previous location was invalid.