fixed bug in pin.rb file