Fixed bug in fromJson