Fix syntax errors

Just minor details, but some snippets of code were syntactically wrong.