Use wp_loaded action instead of widgets_init