Bug fix for base complex classes.

Fix the issues that occur when a complex class inherits from another complex class.