Fixed empty list error