fixed some problems with stale pointers in conversion
fixed some problems with stale pointers in conversion

elvman/sgscript,snake5/sgscript,snake5/sgscript,snake5/sgscript,elvman/sgscript,snake5/sgscript