Fix r2m.rb script