fixing reddit script crash