fixed bugs in accounts.py