Some code corrections at host.
Not finished yet