fixed my mistake about before commit