[No reviewer required] Fix crash on error