fixed errors in connection.rb