Update main_adapter.rb

correct checking for key