Fixed a bug about command saving.