Fixing some bugs
Fixing key parameters order