fix bug for empty value attr of former