fix bug in pressure calc