handle missing columns in groupby, fixes #2