small sql fix