fix trimming empty timelines