better functionality and fixing opening the widget after saving