fixed broken distinct