Fix strange output when a following segment is empty (fixes #101)

When searching for the next segment to base background coloring on, it
skips empty segments now.

This should fix bug #101