fixed bug in host error handle