fixing unfinished var_realloc