Syntax error on creating object