more fixes to the sql file