fix for invalid return type from sorted connections