fixed color assignment bug