Updated the machine= method's error handling.