Fixed syntax error and undefined variable