Added a depth test.