Add some conditions on widget-show sequence
More work on rewrite