update md-insert, fix bug