fixed type bugs in catts.c