Small fix in density.py