Script transformation bugfix