Did you ever have this problem ?
When your form receives a new respons, your formula's are being updated and the ranges of the formula doesn't match the correct range anymore ?
Here's a little script that can solve your problem !
This script uses the setFormula(formula) function.
Enjoy !