fixed bug where class with same unique_id is being added twice