fix cpp-tests resource crash