Fix syntax error and weiner check