The stone he put in its place looked exactly like Jon's stone, except that it wasn't. It was the Hangover Stone.
It worked just like the original rock did - except that any mind control, altered memories or other mental changes suffered by the target of a wish wear off completely when they next fall asleep. The target would wake up complete with the memories of their life before the wish was made, plus the knowledge of all they've done since - for better or worse!