Fixed missing typecast