Rvm fix

Fixed a few bugs with RVM.