Fixed multiple script loading issue. Still not perfect.