repair a bug in colorFlush