fixes to sql file