Fixes for marshall unmarshall