Fix range for params and add a unit test