fix missing closing brace error example
fix duplicate var error example