fixed access to null goldAmount