Improve error message.
Fix broken decode element parsing.