fixed bug with params