fix superheating and supercooling for java backend