Syntax errors fixing