some fixes to analysis for python3