Added column to the query in the getLast function.