Bug fix for serializer + adding more debug info inr printing functions