Fixed staging buffer reallocation bug