don't load scripts more than necessary