fixed bug of crash caused by incorrect color code