fix for python3. merge #1