Fixes bugs with tabs not being converted, and the viewer on refresh not getting all the text