Fix gem version detection