Fixed error in SQL.