fix depth calculation