encrypt bugfix