Compensating for effects of pressure changes