Fixes for folding (and formatting)