Added function before and after cloning item.