Fixed #1870 folding not working