Fixed entity check