It turned out to be simpler than I thought. Merging and fixed.