[#39] Version 0.4.0 introduced an exception that broke JSON serialization - fix