Fix error saving analysis results