Correct errors in casting code for binding vals to statements.