Fix error when upgrading account