Fixed SQL script.