Fixed issues with removing module.