Fix issue with not being able to serialize JSONObject