minor fixes in documentation

example code in the documentation does not seems to match the current status in the code. I just fix a couple of lines to make it match.