fixed cast error.