give up the hack as it does not work capture well

This reverts commit 40f4d082bcfbf357a6c1d3957b4cf8539728b2af.
change some long to int