Remove several incorrect distribution bugs
Move save operation to preserve water depth.