Fixed chipmask bug.