Fixed bug when accessing the first item in an empty list. Replaced tabs with spaces.