Fix undefined name "reset"