simple fixes to analysis script