Changes to fix the selected account problem.