Fixed upcasting