bug fix on setting dynamic attr