Fixing SQL files