fixed trimming list of null entries