Fix crash happening on failure.