fixing various formatting bugs