Simplify nextMissingChunk(), getEndChunk()