Fix empty list case