Minor fix avoiding wrong rewrites of payloads between two chunks
Minor code simplifications
Bump to version 3.1.37