Fixed a bug when adding a new action