It does work as expected. I have narrowed it down more and the problem is when using it with the Page Builder by SiteOrigin. I am selecting the widget and inserting it into a page builder block. This is when the error occurs. Thanks for replying so quickly!!!