Fixing module loading order bug?