fixed bugs in models complex_parent and simple