Fix code coverage while legacy project is enabled