Fixed injection script to actually close when finished