Updated version, including the fix for the filter