Fix in stm, calculations