Fixed scaling with width or height being 0.