properly pop cycles if we match a lot