Corrected return value for empty list

Corrected return value for empty list