Fixed some issues in samples introduced in last commit.