fix in the treatment of the qual flag