test and serialization bugfix