Correction for compatability with python 2.