Fix MAX_CHAIN_LEN application
Merge branch 'iteco' of https://github.com/maelnor/quantum into iteco