Widgets Disappear after 1 or 2 seconds

I am trying to create an extension for jupyter notebook but the extension does not seem to work as expected .
The extension basically loads the widgets on startup of each new notebook .
The issue is the widgets load for a brief second and then disappear .
when i run the cell again the widgets work as expected.

Any suggestions?