Encryption fixes

Works fine now. /me goes off to google how to undo this thing.
Thanks mdmower for advice.