this breaks count queries.... will fix, but don't merge this in the meantime