fix to make quota var global otherwise we could get exception