Fix handling of decimal values, this is needed for python 2.6