fix bug has_gem missing