1) Button "shared" works only in multiplayer, because it LITERELY multiplayer option (makes this actor shared for others players).
Otherwisr it frosses your game.
2) You didn't change code of gems (it still adds to local varaible instead of global).
Try to rename varaible "gems" to something like "gems2", "gemsing", "gem" and ect.