#1508 fix audit logic