fix decimal types
make compatable with python3