Fixed bug when closing process with primus-faye