typo correction and correction to state diagram