Bug fixes

aleatory.js
- fixed some bugs that occurred when folding