Entity inconsistency fix