Fix error in constructor