refine the condition check and correct a check condition