Add host and fix bugs on doctrine switch connection.