globals not loading correctly causing failure to insert reference plugin on reload - fixed