fixed few bugs in seralization and commented out debug meassages