params count bug fix