fixed Nullpointer Exception at new Location(location)