Fixes for deleted external accounts

Fixed a couple functions so they don't crash if an account is deleted.