Gem security upgrades