Fixed entity deletion