hotfixed util function in ranged.js