Fixed bug that happened on removing collection of elements