turn off debug, and fix hostname detection