fix encryption level handle invalid values