fix quota tests and common impl