fixed bug in widget scripts