Merge "Fix bug in getLastLocation()" into tm-dev