Make sure output of tapply are vectors, not 1d arrays