Fixes to three-phase flash algos.