Before script tweak