Fix cast error.