fixed python 2.4 incompatibility