fixed reinsertion error, still a little janky