tweak when redefinition of scripts is done