Fixed issue with JSON serialization