fix gemstone scripting