Fixed forwarding the correct color when the button is pressed.
Introduced blocks.