fixed bug where water depth was getting written as -1