C2ctool improvements

fix #1063, #1064