Fixing method create_host_state to add the self parameter