(Bug 3081) Fixing the SQL from the last commit.