Fix for crashes when stderr messages are received