Make sure invert flag is set before clearing digits, or they might get reloaded incorrectly