Fixed bug with insert