bugfix in serialization.h