Added mutex for homehost calculation