fixed bug where data.list of length 0 not considered data.list