Fix typo in aasm_write_state