Why does this bit of code belong in chunk_ends_type? Maybe I'm missing something.