fixed a flow for keys namespace check.