ensure host_id is an integer