fix reference to totalCount