Bugfix flash calculations

fixing some errors in two phase diagram calculations