fix bug in folding.. eek