Location NULL

Fixed the problem when the location is NULL