Fixed ObjectOutputStream

Apparently you need to flush the object