I think I've found a way to fix this, as I'm not getting uniform distributions anymore.