Update nc.rb

Tested these changes out locally and it works as expected.