Fixed reallocation errors.