Fix empty list errors