fix distinct count