Update funding algorithm to work properly.