Corrected entity cast