fix bug about attribute reference