Added conditions to provide correct section numbers in numberOfSectionInTableView delegate.