fix regression and fix format management