correct width and height calculations for svg