small sql change before merge