Fix input loop crash when processing deaths