fix collapsing of dynamically loaded lines

Closes #22.