gem order fix