fixed errors with empty locations