fixing edgecase resulting in wrong attributes