Fixed a cursor not closed in Accounts