fixes and sql file