Fixes to interact code for Py 3