Connection: fix nested OR when searching