Fixed error if width or height of webview is 0.