Fixes issue on update script function