properly handle invalid machine_id