code bug fixes for nodemanage.rb