Fixes in authorization rule based on average discount