fix decode bug in enums
support for default values
add tests for defaults
2.1.2