Fixed crashes when leaving the selected bg/foreground colors as nil.