fixed bad ids from constructing entities from buffers