retina fix, backported from Soda