new fixes and latest sql file