fix old and new document style