Fixed realloc in buildstring