Fix python string formatting bug