Tweak testing script to set flags correctly