fix to marshalling problems