fix record bugs.