Fixed encrypting large files, and KPGenerator