[DONE] fixes from old mergeaccounts branch