Atoms serialization, fixed crash on double port closing