fixed NPE with modules without a parent