fix a bug in CIB template setup