fixing dpi on the fly