adding better check for collection name change