fixed bug in discovery