Fix cipher decoding