Fixed some tuning related issues and a bug in HPSO which didnt reset the stagnation counter when the behavior changed.