Fix icon decoding error.

Fixes #590.