Doesn't crash anymore at the end.