fixed bug in colored_name function