key_commit: bug fix