fixed a little cast error