Changed ordering of debugging outputs in serializer. This resolves #48.