Turn off references to solve a mysterious issue with Kryo