Revert "Revert "Fix undefined wealth""

This reverts commit fc60cb161071a4a8397fc37483232fd195fc36ae.