Add missing type casts