Fix partial and syntax errors