fix some handle commit bugs