Update for TypeError

Updated code with fixed subclass attributes in the parent (__init__)