Fix DPI bug and remove unnecessary line