Added fix for superscript and subscript resetting