bug fix to account for params