A few tweaks to the custom error filter