corrected quiet flag function