Refraction and depth fade.

I am trying to make a water material. When I use The refraction material input, and also use depth fade to control the material transparency, I get this problem.
However, I don’t use depth fade, the problem goes away.