Fix syntax errors etc.