Fixed connect to host function and test.