Fixed sometimes crash when removing last digit.