The code didn't account for interval Queries returning zero when reaching the end.
kotlinx.serialization-json