Fix fix for #600 on Python 3.x (type comparison works differently in 3.x).