add template item and fix bug with dragndrop