Fixed PKCS7 to be more efficient