more minor reference fixes
Make py2 compatible