Improved the bold and italics handling