Fix a bug in cpall