buggy editing functionality