Fixed up the color detection