Fix syntax error and some of the tests