Fix reset in python string