Merge "fix NullPointerException if location is not set."