fixed flawed gems variable