Unsafe casts removed