fixed typos in the state pattern