Editor SQL fix