Typecast fix