more explicit check for positive depth