Solved depth/z-coordinate problem