bugfix: keep attributes when sampling