Fixed bug in assert statement in the constructor