Fixed for condition when empty collection.