Fixed bad SQL.