Fix issues in documentation samples