Fix hang in incremental build

Fix hang on incremental build