Fixing the doc examples

Fixing typos and checks