Fixed typo.
Improved ckecking of of existing connection in export.
Adjusted application for new cipher schema.