script ref fix