Fixed a memory error

* Fixed an error where the memory of the pressure variable
was overwritten