Fix undefined element errors.
Merge pull request #6 from danbeam/master

Fix undefined element errors.