Fixed scripts for phi