fix wallet load when there is invalid records, fix crash