clean-up + fix bug in host state