Some fixes for editing