Doesn't insert elements twice anymore