Fix partition density functions