fixed bug with highlight function