support encryption, bugfixes