fix sql file errors