Fixed type cast error.