Syntax error in main constructor