fix bugs in module service for ruby1.8; fix bugs for bonfire