Only rename if possible
Fix to JS and index uses hashmap