Resetting last state in the list so that when it is cleared it does not clear the second last state. Fixes #206.