several small fixes with handling color