fix some bugs in rvm wrappers