Fixed IntelliJ compilation warnings
Fixed a bug that gave me nightmares : seem to randomly fail JSON serialization, depending on JDK version.