Fixed boolean unmarshalling and removed unused variables.