fix some compile bugs related to RESERVOIR_TEST