Fix bug with null entries
Generalise to distinguish accounts and anons