fix issue with setAttribute