Fix life and money exceeding the max when the max changes (fix #355).