FIxed issue with widgets in Script mode