Fixed script insertion, used head to overcome same-origin policy.