Fixed an issue where didDismiss was not being sent to the delegate when dismissing from expanded state.