changed entities

added not null condition;