@Swati - No, it wasn't a blooper. See, what happened was the Castiel needed more souls so he recruited Balthazar to go back in time and unsink Titanic. That would save all those people and their souls and add so many more as their descendants over the years. And that's why Fate was upset and killing all the descendants of these people who should not have survived.
That change in history altered the chain of events and because of that, Ellen and Jo survived. Now Fate was really upset and would kill Sam and Dean as well if the right events in the history weren't restored. So Castiel decides to let Titanic sink to get the upset Fate off their backs. In the end, Dean and Sam feel like they just dreamed all about Ellen and Jo surviving and Ellen marrying Bobby. However, Castiel explains that that really happened with the whole unsinking the Titanic thing.