fixed realloc