better shares detection + tests fix