Fixed a bug that was allowing raw data into the encryption stream, and causing the program to terminate prematurely on unencryption.