db: fix how parameter math works