Minor bug fix on output quality control-2

better criterion.