Fixed a minor error in foldtext functions