Fixes for density on-the-fly

Signed-off-by: Dragon7780 <Dragon7780@hotmail.nl>