Fixed a bug where unconnected ctxts were returned