Fix empty collection problem