Updates to better handle failure conditions.