fix various wrong casts