Fixed bug that prematurely closes the zmq context.