Fix code examples

Thanks to @AjitDingankar for mentioning the errors