finish fixing checkQual flow