Ensure Python3 compatibility