Fixed bug in re-attribution