Entity security fix