correctly group where, fixes #13