fixing of small bugs in run_analysis