fixed discovery bug