fix compilation errors with constructors