This is the right fix. The return result is intended to be treated like a tuple (partly precisely for backwards-compatibility with earlier Python code). I would prefer to use "4" instead of "-2" for the query access, though, since then you're not relying on the length of the tuple (and "4" is the documented value).