fixed mapping bugs when remove nested modules