Bug fix : NSRange
Refactoring