Fixed Casting problem