Backport sieve editor fixes from git master