Fix bugs on module install.