Fixed some problems (colinearity when randomly making formulas, and some bugs maybe)