Minor bug fixes
tools/auto-ret.py integration