Small fixes to record_string