Fix bug when loading KB and opt_client