handle dpr changes (fixes #18)