fixed empty list case for text method