Fix #1342 (Multihost mode bugs)