revert marshal code
fix warnings