Bug fixes for EVP test cases