Fix some bug for config and cryptor