Fix broken encryption