fix incorrect handling of dynamic amount of parameters in db