fix get_leads implementation