Fix undefined variable
Fix invalid syntax