Add tests for account.

+one tiny bugfix.