bug fix to make the preload work in hosts.js