Fixes Python2 issue. Tested on Debian, Arch and Fedora.