fixed bug in for params