fix do_find_free_variables