Added check for missing attributes. Fixes #73.