fix deselection of deleted flows
do not output pictures before sequence header
fix multiple corner cases