Fixed a couple of bugs in ModuleBundle

Added tests