Fix some rvm scripting issues