fix record check condition