RoutedEvent bug fix