Bug fixes to accounts