Fixed setting of depth.