Fixes IRC crash on disconnect.