There are 2 endings to the episode "Inna-Gadda-Sabrina", the first one involves Salem leaving for Philidelphia (which explains his appearance in "Boy Meets World") and the ending in other airings and syndication involve Salem getting the time ball out of his system by using the litterbox (off-screen).