Fix rvm versioning and add narray detection