Dismiss detail view controller after rotation