Fixed error where key-based encryption output a version number of 2.