Update quality and margin