fix several bugs in notebook and wiki

Please merge.