fixed how params is grabbed