Fix some compile errors caused by the new error handling