fixed build and marshalling