Please move the undefined variables to the end of the "variable definition" block.