Fix constructor parameters and initialization error