Fix broken calculation of amount required for draining liquids from tanks.