make deletion after insert work