Bugfix for issue #40

- added fix which is already in the 0.5 branch
- added attribute checking and default setting before creating a new resource
Merge pull request #44 from ffeldhaus/master

Bugfix for issue #40