Improvement in Thermodynamic Routines for Flowsheeting Calculations under Near-critical Conditions