Fix several syntax errors