Fix nil reference on error.