fix audit quadratic bug