added bad hack to control where in head resources are injected