fix color component extraction