Fixed incorrect GEM_HOME bug