fix a bug for pre commit