- Add last_value field to fix stuck bit problem.
- Fix silly bug introduced during reformatting.