not so elegant fix for #170. will handle it better once we deal with #172
handling scalar results in filter
handling special case filter(., TRUE) and filter(., FALSE )