script sql fix