Fixed issue when inserting math inside a div tag