fix errors with analysis of locals