fixed wrong-parent-type bug