fix model with multiple levels (more than 3)