More tests and fixes
Use predictable return values in slave example