fix for handling NA in returned generic vector