Added empty list guard