fixed bug in saving kata state