fix attributes with value of 0 bug

If an attribute with a key was given a value of 0, it was ignored. This fixes that.