Fixed crash in pyrf detect_many