Fixing issues with HTML5 document outline