fixed text formatting and clearing