fixing gem structure