fixed n_calls issue