fixing a bug with the accounts when its undefined