fixed record saving