Correct some bugs in host module.