Python2 compatible.