fixed bug with sql file