fix record bugs