Fixed bug in foldUp