Are you sure that you didn’t made a typo and pass to the criterion the tuple of the two outputs instead of only out?
You may want to print the returned values to make sure they are what you think.
There are no problem returning multiple elements.