bugfix related to minimum depth