major sql fix