bug fix in sql file