(Previous) Sessions

Fixed bugs encountered from previous commit, when retrieving data from
the database table.