Fix exception on IRCD cleanup