fixed issue when attribute value cannot be null