critical bug inside class creation