fixing serialization issue happening with some jdks