I saw this episode last night. It is really a good one. A two-part episode this involved Picard assumed to be dead, and both him and Riker helping out the criminals.
The best part is when the pieces to the weapon are assembled and Picard figures out how to avoid it working on him.
At the end, Riker says that he can't take orders from Picard because he is supposedly dead, so Picard says that they should take Riker to the brig because he "broke" many federation laws. Data then begins to take him away and it ends with him trying to explain that it only was a joke.