code sample fixes