fix bug in attribute