Fixes unaccepted behavior in module configuration

fixes #7011