Fix a syntax error and variable scope error.