Fixed issues with archived task pagination. Closes #872