Fixed an issue where the inView had been removed from the view hierarchy before dismiss was called.