Fixed some bugs + corrected params modifying