fix init_record may not exit bug