At one point in the episode Picard and Data leave engineering and enter a turbolift. While on the lift you can notice that Picard only has three pips on his collar. Pips are the little circles which represent rank. Three gold pips, which is what Picard had, is only the rank of commander. He should have four gold ones because he is a captain. When they exit the turbolift onto the bridge his rank is restored.