Changed custom-type registration timing earlier.
Ready for version 0.5.9.
Merge branch 'release/0.5.9' into develop