fixed bug in function getTextMapInRage