key_commit: Fixed some errors when refunding fees and penalties.