Fixing long standing bug in AnalysisRecord