fix a bug when adding an account