Fixed typecast warning