Restore flags in measure_response fixed and function called correctly for measurement