Bugfix: take minimum of allowed slopes, not maximum.