Add chigiri feature.
Fix buffer overflow.