Various account fixes
Merge pull request #460 from dswd/account-fixes

Various account fixes