Fixed issues regarding depth.