Fix to set state of encryption process