BugFix and initial sql editor