Bugfix for python3 compatibility; unicode() function is undefined in 3.x