Fixed bug where library didn't reset some water variables leading to wrong results on next run.