Fixed unit tests & marshalling error