key_commit: Fixed the statetaxstagegl routine