Fix incorrect SQL syntax