Fixed issue with undefined document width value and arithmetic operations with strings and integers