Made toolbox stuff compatible with Python 2.