various fixes for edit