fix errors + pb with 0 temperature