Manually replace the current lastValue

Proposal to fix #19