Fix bugs when using option clean-dark-data