fixed typecast