Fixing decode issue and adding paint filter from pull request #2