Making compatible with python 2.5