fix the bug that in attribute setting