Fix implicit typecast