Fix for enum values as defaults

I had a few minutes last night and worked out what was wrong here. Fixes #8.