You are probably running into this:
NIM072621 - Flex Viewer's extract data widget returns incorrect (or unexpected )output when using the draw rectangle method.
This issue was never resolved and was closed last September. I got around it by eliminating the rectangle tool from the widget.