fixing dict_keys is not subscriptable.