added char checking
merged
fixed a glitch in color error check