fix removal of custom attributes
Merge pull request #7 from SimonCropp/master

fix removal of custom attributes