Fix bugs in Account