Fix a small bug in the implementation of lastToken

it wasn't resetting the lastToken state after adding the getter/setter.