edit_handler bug fixes