fixed bugs in attrs