tries to fix loading rvm shit and a little improvement on the ex function