Fix object cast