FIX:Syntax errors and encoding