bug fixes and optimizations: tNDJRemaining