fixed bug in rangex