fixed bug in 'add' and 'remove' functions to edge collections