fix problem with loc nil entries