fix insert button behavior