Fix typecast