changed behavior of compenstaion in such a way that the air pressure is only considered when it is the lastest value before the water pressure