Fix handling of valueless attributes. Closes #150