Encryption now works as it should.

Signed-off-by: Lucas Arnström <lucasarnstrom@gmail.com>