Small improvement related to encryption flag