fix syntax error and bug when checking GET variable