Fixed TypeError on Debian Wheezy (Closes #45)