fix #517: BytesQuery accepts unicode strings