fix the check on collection.